﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DAOMall;
using DTOMall;

namespace BLLMall
{
    class ProductsBLL
    {
        ProductsDTO pControl = new ProductsDTO();
        public bool Insert(Products b)
        {
            if (pControl.insert(b))
            {
                return true;
            }
            return false;
        }
        public bool Update(Products b)
        {
            if (pControl.update(b))
            {
                return true;
            }
            return false;
        }
        public bool Delete(int id)
        {
            if (pControl.delete(id))
            {
                return true;
            }
            return false;
        }
        public DataTable getAll()
        {
            return pControl.getAll();
        }
        public Products getByID(int id)
        {
            return (Products)pControl.getByID(id);
        }
    }
}
